<%@ page import="com.tgy.JspDemo.com.tgy.entity.Student" %>
<%--
  Created by IntelliJ IDEA.
  User: tanggy
  Date: 2021/12/7
  Time: 15:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--<%
    Student student = new Student();
    student.setAge(1);
%>--%>

<jsp:useBean id="student" class="com.tgy.JspDemo.com.tgy.entity.Student" scope="page" />
<jsp:setProperty name="student" property="name" value="tgy"/>
<jsp:setProperty name="student" property="sex" value="2"/>
姓名<jsp:getProperty name="student" property="name"/>
年龄<jsp:getProperty name="student" property="age"/>
性别<jsp:getProperty name="student" property="sex"/>
</body>
</html>
